#ifndef __CAMERA_H__
#define __CAMERA_H__

#include "Tools/Singleton.h"
#include "cocos2d.h"

namespace LTGame
{
	class Camera 
		: public Singleton<Camera> 
	{
	public:
		Camera();
		~Camera();

	public:
		inline float getCameraLeft() const { return cam_LT_x; };
		inline float getCameraTop() const { return cam_LT_y; };
		inline float getCameraRight() const { return cam_RB_x; };
		inline float getCameraBottom() const { return cam_RB_y; };

		inline float getCameraW_w() const { return cam_w_w; };
		inline float getCameraH_h() const { return cam_h_h; };
		CC_SYNTHESIZE(float, cam_vy, SpeedY);

		void update(void);
		void setPosition(float center_x, float center_y);
		void addCameraLeft(int num);
		void addCameraTop(int num);
		void addCameraRight(int num);
		void addCameraBottom(int num);

	private:
		void setSize(float w, float h);

	private:
		float cam_LT_x;
		float cam_LT_y;
		float cam_RB_x;
		float cam_RB_y;

		float cam_width;
		float cam_height;
		float cam_w_w;
		float cam_h_h;
	};
}

#endif